<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
   <table border="1" align="center" >
       <tr>
       <td colspan="10" align="center"><h2>欢迎你，${user1.username}</h2></td>
       </tr>
   		<tr>
   			<td>计划id</td>
   			
   			<td>计划名称</td>
   			<td>开始时间</td>
   			<td>截至时间</td>
   			<td>计划内容</td>
   			<td>计划人</td>
   			<td>计划状态</td>
   			<td>计划费用</td>
   			<td>操作<a href="add">添加</a></td>
   		</tr>
   		<c:forEach items="${list }" var="plan">
   		<tr>
   			<td>${plan.pid }</td>
   			
   			<td>${plan.pname }</td>
   			<td><fmt:formatDate pattern="yyyy-MM-dd" value="${plan.pstar }" /></td>
   			<td><fmt:formatDate pattern="yyyy-MM-dd" value="${plan.pend }"/></td>
   			<td>${plan.pcontent }</td>
   			<td>${plan.pmakeren }</td>
   			<td>${plan.pstate }</td>
   			<td>${plan.pcoutmoney }</td>
   			<td><a href="plangetById?pid=${plan.pid }">修改</a>&nbsp;<a href="plandelete?pid=${plan.pid }">删除</a></td>
   		</tr>
   		</c:forEach>
   </table>
   <div align="center"> 
	
			<a href="index?index=1">首页</a>
			<a href="index?index=${index-1 }">上一页</a>
			<a href="index?index=${index+1 }">下一页</a>
			<a href="index?index=${count}">尾页</a>
			
        </div>
  </body>
</html>
